import http from '@/request/index'
import { LocationQueryValue } from 'vue-router'

/**
 * 获取菜单数据
 */
export const getMenu=(id:LocationQueryValue):TRes<IAddMeunList>=>http.get(`/menu/${id}`)
/**
 * 修改菜单接口,表单提交
 */
export const MenuUpdate=(payload:IAddMeunList):TRes<number>=>http.post(`/menu/update/${payload.id}`,payload)
/**
 * 获取下拉框数据、
 */
export const MenuList=(parentId:number):TRes<IAddMenuData>=>http.get(`/menu/list/${parentId}`)